package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.exception.common.ApplicationException;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * @Author: wujiapeng
 * @Description:
 * @Date: created in 10:06 2018/1/18
 */
public class ServiceFeePayResultRequest extends ParamsObject{
    /**
     * 交易流水号
     */
    private String tradeNo;

    /**
     * 是否支付成功
     */
    private Boolean serviceFeePass;

    /**
     * 支付息费金额
     */
    private BigDecimal serviceFee;

    /**
     * 息费支付流水号
     */
    private String accessNo;

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public Boolean getServiceFeePass() {
        return serviceFeePass;
    }

    public void setServiceFeePass(Boolean serviceFeePass) {
        this.serviceFeePass = serviceFeePass;
    }

    public BigDecimal getServiceFee() {
        return serviceFee;
    }

    public void setServiceFee(BigDecimal serviceFee) {
        this.serviceFee = serviceFee;
    }

    public String getAccessNo() {
        return accessNo;
    }

    public void setAccessNo(String accessNo) {
        this.accessNo = accessNo;
    }

    @Override
    public void validate() {
        if (Objects.isNull(tradeNo) || Objects.isNull(serviceFee)
                || Objects.isNull(serviceFeePass) || Objects.isNull(accessNo)){
            throw new ApplicationException("Parameter error");
        }
    }
}
